package day20171013;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by JAVA on 2017/12/29.
 */
public class TestReader {
    public static void main(String[] args) throws IOException {
        {
            BufferedReader reader=null;
            try {
                reader=new BufferedReader(new FileReader("D:\\dev\\log.txt "));
            }catch (IOException ee){
                ee.printStackTrace();
            }
            String str=null;
            int j=0;
            int tempchar=0;
            while ((tempchar=reader.read())!=-1){
                j++;
                str+=tempchar;
            }
            System.out.println(str);
            System.out.println(j);
        }

        }
    }

